import React, { useState } from "react";
import { View, Button } from "@tarojs/components";
import { Dialog } from "@/components";

const DialogDemo: Taro.FC = () => {

    const [isOpen, setIsOpen] = useState(false)

    return (
        <View>
            <Button onClick={() => setIsOpen(true)}>
                Show
            </Button>        
            <Dialog 
                isOpened={isOpen}
                title="提醒"
                content="正文内容"
                onClose={() => setIsOpen(false)}
                onConfirm={() => {setIsOpen(false), console.log('ok')}}
            />
        </View>
    );
};
export default DialogDemo;
